package demo4;

/**
 * @Author 12629
 * @Description：
 */
public class Test {
    public static void main(String[] args) {
        Person person1 = new Person("1234");
        Person person2 = new Person("1234");

        System.out.println(person1.hashCode());
        System.out.println(person2.hashCode());

    }
    public static void main1(String[] args) {
        Person person1 = new Person("1234");
        Person person2 = new Person("1234");

        boolean flg = person1.equals(person2);

        System.out.println(flg);//true


        flg = person1.equals(person1);


        //System.out.println(person1 == person2);//false
    }
}
